1. Technical Field
The present invention relates generally to computer databases and in particular to managing access to computer databases. Still more particularly, the present invention relates to a method and system for coordinating agent access to a computer database.
2. Background
Databases are useful tools for storing, organizing, and enabling access to stored data/information. Database management systems (DBMSs) are often utilized by database users to control the storage, organization, and retrieval of data (fields, records and files) in a database. Many DBMSs are implemented in a client/server environment, in which the server of the DBMS is connected to one or more client systems via a network, and the networked server coordinates client accesses to the database. Data within the databases are commonly updated and/or accessed by one or more agents associated within these remote clients connected to the DBMS.
The DBMS includes a database “logger” that records (or logs) every change that occurs within persistent storage, in order to make the database reliable. The log consists of a temporary portion and a permanent portion for efficiency of input/output. The temporary portion is used to record details of database operations such as changes to the database as they are performed. The temporary portion is known as a log buffer and resides in the memory of the DBMS. The contents of the temporary portion are periodically transferred to the permanent portion, for example when the log buffer becomes full.
Agents, on the behalf of clients, make changes to the database and record these changes in the log buffer. When an agent commits the changes, the agent process suspends until the logger writes the changes to persistent storage and notifies the agent that the changes are permanently recorded. In multiprocessing environments such as large symmetric multiprocessing (SMP) systems, a large number of clients (users) may make changes to the database contemporaneously with each other. However, to insure the reliability of the database, only a single client (using a corresponding agent process) is permitted to update the database at a time. The logger provides a control mechanism that allows the scheduling of different agents to perform updates using a system referred to as “thread wait.”
With the thread wait system, when there are thousands of agents that are executing transactions within the overall system, the logger has to first write the changes to permanent storage then notify all of the thousands of agents that these agents are now able to proceed with their respective processes. The notification of this large number of agents takes a significant amount of time and accounts for a large latency in completing each commit process by the logger. The overall transaction rate by which the agent processes update the log is limited by the speed that the logger is able to write the data and then notify all the waiting agents to proceed.
Thus conventional methods include an inherent latency as the agents are all made to wait on the logger to notify every waiting agent before any one of the waiting agents is able to proceed. Measurable inefficiencies in the database logging process have been noted, and as such, the invention recognizes the need for an improved method to complete the logging process without the inherent latency of the current methods.